<?php

namespace app\common\model;

use think\facade\Request;
use think\Model;
use think\model\concern\SoftDelete;

class Order extends Model
{
    use SoftDelete;
    public static function getList($where = array(), $pageSize, $order = ['sort', 'id' => 'desc'])
    {
        $list = self::with('Users')->where($where)
            ->order($order)
            ->paginate($pageSize, false, ['query' => Request::get()]);
        return $list;
    }
    public function Users(){
        return $this->belongsTo('Users','user_id','id');
    }
}
